package designPatterns.factory;

public class YellowFactory extends Factory {

	public static final int ChinaID = 1;
	public static final int JapanID = 2;

	@Override
	public YellowPersion createPsersion(int pid) {
		YellowPersion vPersion = null;
		switch (pid) {
		case ChinaID:
			vPersion = new ChinesePersion();
			break;
		case JapanID:
			vPersion = new JapanPersion();
			break;

		}
		return vPersion;
	}

}
